<?php
function ListHotelTypes($status=-1)
{
    global $dbsql,$language;
    
    $sql_select = "select * from tblhotel_type where cLanguage='$language' ";
    if($status>=0)
    {
        $sql_select .= "and iStatus= $status ";
    }
    $sql_select     .= " order by iOrder";
    return $dbsql->load($sql_select);
}

function ListOptionHotelType($select=0)
{
    global $dbsql,$language;
    
    $sql_select = "select iId,cName from tblhotel_type where cLanguage='$language' order by iOrder";
    $rs         = $dbsql->query($sql_select);
    $return     = '<option value="0">Select type</option>';
    while($result   = $dbsql->fetch_array($rs))
    {
        if($result['iId']==$select)
        {
            $return.='<option value="'.$result['iId'].'" selected>'.$result['cName'].'</option>';
        }else
        {
            $return.='<option value="'.$result['iId'].'">'.$result['cName'].'</option>';
        }
    }
    return $return;
}
?>